package com.epam.player.desktop.logic;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.JButton;

public class KeyAdapterLogin extends KeyAdapter {
	private JButton button;

	public KeyAdapterLogin(JButton button) {
		this.button = button;
	}

	@Override
	public void keyTyped(KeyEvent e) {
		if (e.getKeyChar() == '\n') {
			button.doClick();
		}
	}
}
